function GM:PlayerInitialSpawn(ply)
	ply.InRace = false
	ply.InQueue = false
	ply.InGarage = false
	ply.InGarageMenu = false

	ply.Garage = nil
end

function GM:PlayerLoadout(ply)

end

function GM:PlayerShouldTakeDamage(ply, attacker)
	return ply.InRace && (attacker != ply.Vech)
end

function GM:CanPlayerEnterVehicle(ply, vehicle)
	return IsValid(ply) && ply.Vech == vehicle
end

function GM:CanExitVehicle(ply)
	return !ply.InRace
end

hook.Add("CanPlayerSuicide", "NoMenu", function(ply) return !ply.InGarageMenu end)

hook.Add("PlayerDeath", "RemoveVehicle", function(ply) GAMEMODE:RemoveVehicle(ply, true, false) end)
hook.Add("PlayerDisconnected", "RemoveVehicle", function(ply) GAMEMODE:RemoveVehicle(ply, false, false) end)
hook.Add("PlayerLeaveVehicle", "RemoveVehicle", function(ply) if ply.InRace then GAMEMODE:RemoveVehicle(ply, true, true, ply) end end)